package aiku.numericalcontroloa.Service;

import aiku.numericalcontroloa.Base.Utils.Result;
import aiku.numericalcontroloa.Model.Dto.PurchaseOrdersDto;
import aiku.numericalcontroloa.Model.Entity.Products;
import aiku.numericalcontroloa.Model.Entity.PurchaseOrders;
import aiku.numericalcontroloa.Model.Vo.PurchaseInfoVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
* @author 马
* @description 针对表【products】的数据库操作Service
* @createDate 2024-02-23 11:02:39
*/
public interface ProductsService extends IService<Products> {

//    Result apply(ProductsDto productsDto);

    Result purchaseList(Integer page, Integer size);

    Result purchaseReceiptsInfoList(Integer page, Integer size, String receiptsStatus);

    Result purchaseReceiptsInfo(String name);

    Result purchaseReceiptsInfos(String name);

    Result updateReceiptsInfo(PurchaseInfoVo purchaseInfoVo);

    Result getPurchaseOrdersList(PurchaseOrdersDto purchaseOrdersDto);

    Result addPurchaseOrders(PurchaseOrdersDto purchaseOrdersDto);

    Result getPurchaseOrders(PurchaseOrdersDto purchaseOrdersDto);

    Result updatePurchaseOrders(PurchaseOrdersDto purchaseOrdersDto);

    Result applyPurchaseOrders(PurchaseOrdersDto purchaseOrdersDto);

    Result oneKeyPurchaseOrders(PurchaseOrdersDto purchaseOrdersDto);

    /**
     * 根据采购订单集合，获取供应商、采购人，采购产品、采购备注、入库信息的map集合
     * @param purchaseOrdersList
     * @return
     */
    Map<String, Object> getKeyMap(List<PurchaseOrders> purchaseOrdersList);

    Result deletePurchasing(PurchaseOrdersDto purchaseOrdersDto);
}
